/* 目标管理页面样式 */

.goals-container {
    padding: 1rem 0;
}

.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.goals-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.goals-filter {
    display: flex;
    gap: 0.5rem;
}

.goals-filter select {
    min-width: 120px;
}

/* 标签页切换 */
.goals-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 视图容器 */
.goals-view {
    display: none;
}

.goals-view.active {
    display: block;
}

/* 列表视图 */
.goals-table {
    width: 100%;
    border-collapse: collapse;
}

.goals-table th,
.goals-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.goals-table th {
    font-weight: 600;
    color: var(--text-light);
    background-color: var(--primary-light);
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
}

.goals-table th:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sort-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

th[data-sort].active .sort-icon {
    opacity: 1;
    color: var(--primary-color);
}

.goals-table tr:hover {
    background-color: var(--primary-light);
}

/* 进度条 */
.goal-progress {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 优先级标签 */
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-high {
    background-color: #ffecec;
    color: var(--danger-color);
}

.priority-medium {
    background-color: #fff5e6;
    color: var(--warning-color);
}

.priority-low {
    background-color: #e8f5e9;
    color: var(--success-color);
}

/* 操作按钮 */
.goal-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
    background-color: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.action-btn.edit {
    color: var(--primary-color);
}

.action-btn.delete {
    color: var(--danger-color);
}

.action-btn.complete {
    color: var(--success-color);
}

.action-btn:hover {
    background-color: var(--primary-light);
}

/* 看板视图 */
.kanban-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.kanban-column {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.kanban-header {
    padding: 1rem;
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.kanban-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.kanban-items {
    padding: 1rem;
    min-height: 200px;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kanban-item {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kanban-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.kanban-item-title {
    font-weight: 600;
    margin-right: 0.5rem;
}

.kanban-item-category {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.kanban-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.kanban-item-deadline {
    font-size: 0.85rem;
    color: var(--danger-color);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: var(--card-background);
    margin: 5% auto;
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* 自定义按钮 */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #d43f41;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .kanban-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .goals-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .goals-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .goals-filter {
        width: 100%;
    }
    
    .goals-table {
        font-size: 0.875rem;
    }
    
    /* 使表格可左右滚动 */
    .goals-view {
        overflow-x: auto;
    }
} 